package com.wxzz.elearing.livetelecast.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wxzz.elearing.livetelecast.dto.SummitAgendaData;
import com.wxzz.elearing.livetelecast.dto.SummitGuestData;
import com.wxzz.elearing.livetelecast.vo.PlatformLivetelecastFileVo;
import com.wxzz.elearning.common.bean.BaseEntity;
import com.wxzz.elearning.common.constants.LiveConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 平台直播
 * </p>
 *
 * @author
 * @since 2021-04-02
 */
@Data
@ApiModel(value = "PlatformLivetelecast对象", description = "平台直播")
public class PlatformLivetelecast extends BaseEntity {

    @ApiModelProperty(value = "封面图url")
    private String cover;

    @ApiModelProperty(value = "直播名称")
    private String livetelecastName;

    @ApiModelProperty(value = "直播简介")
    private String livetelecastInfo;

    @ApiModelProperty(value = "直播详情富文本")
    private String livetelecastDetail;

    @ApiModelProperty(value = "直播状态 0-未开播 1-直播中 2-已结束")
    private Integer livetelecastStatus;

    @ApiModelProperty(value = "推流状态 0-未推流 1-推流中 2-推流结束")
    private Integer pushStatus;

    @ApiModelProperty(value = "单价")
    private BigDecimal livetelecastPrice;

    @ApiModelProperty(value = "预约人数")
    private Long subscribeNum;

    @ApiModelProperty(value = "观看人数")
    private Long visitNum;

    @ApiModelProperty(value = "累计在线人数")
    private Long onlineNum;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开播时间")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "直播课件 多个用,分隔")
    private String livetelecastFile;

    @ApiModelProperty(value = "课件名称 多个用,分隔 与课件url对应")
    private String livetelecastFileName;

    @ApiModelProperty(value = "文件大小 多个用,分隔")
    private String livetelecastFileSize;

    @ApiModelProperty(value = "直播一级分类id(必填)", required = true)
    private Long livetelecastCategoryIdFirst;

    @ApiModelProperty(value = "直播二级分类id(必填)", required = true)
    private Long livetelecastCategoryIdSecond;

    @ApiModelProperty(value = "直播流密钥")
    private String streamName;

    @ApiModelProperty(value = "是否允许录制 默认允许 0-不允许 1-允许")
    private Boolean isAllowRecord;

    @ApiModelProperty(value = "直播录制规则")
    private String recordRuleId;

    @ApiModelProperty(value = "讲师id")
    private Long docentId;

    @ApiModelProperty(value = "媒资id")
    private String assetId;

    @ApiModelProperty(value = "回放路径")
    private String returnSeeUrl;

    @ApiModelProperty(value = "是否首页展示 0-否 1-是")
    private Integer isPageDisplay;

    @ApiModelProperty(value = "聊天室id")
    private Long roomId;

    @ApiModelProperty(value = "是否短信 0-否 1-是")
    private Integer isMms;

    @ApiModelProperty(value = "是否电话 0-否 1-是")
    private Integer isPhone;

    @ApiModelProperty(value = "是否公众号通知 0-否 1-是")
    private Integer isPublic;

    @ApiModelProperty(value = "直播开始前X分钟开始提醒")
    private Integer smsRemindMinute;

    @TableField(exist = false)
    @ApiModelProperty(value = "讲师名字")
    private String docentName;

    @TableField(exist = false)
    @ApiModelProperty(value = "讲师照片")
    private String docentPicture;

    @TableField(exist = false)
    @ApiModelProperty(value = "是否收藏 0-否 1-是 ")
    private Integer isCollect = 0;

    @TableField(exist = false)
    @ApiModelProperty(value = "直播一级分类名字")
    private String livetelecastCategoryIdFirstName;

    @TableField(exist = false)
    @ApiModelProperty(value = "直播二级分类名字")
    private String livetelecastCategoryIdSecondName;

    @TableField(exist = false)
    @ApiModelProperty(value = "活动id")
    private Long activityId;

    @TableField(exist = false)
    @ApiModelProperty(value = "活动名称")
    private String activityName;
    //================峰会===================
    @TableField(exist = false)
    @ApiModelProperty(value = "峰会介绍")
    private String summitDetail;

    @TableField(exist = false)
    @ApiModelProperty(value = "直播议程")
    private List<SummitAgendaData> summitAgendaDataList;

    @TableField(exist = false)
    @ApiModelProperty(value = "直播嘉宾")
    private List<SummitGuestData> summitGuestDataList;
    //=======================================

    @TableField(exist = false)
    @ApiModelProperty(value = "课件")
    private List<PlatformLivetelecastFileVo> platformLivetelecastFileVos;

    @TableField(exist = false)
    @ApiModelProperty(value = "推流服务器")
    private String livePushService = LiveConstants.LIVE_PUSH_DOMAIN;

    @TableField(exist = false)
    @ApiModelProperty(value = "直播推流地址")
    private String livePushUrl;

    @TableField(exist = false)
    @ApiModelProperty(value = "直播拉流地址")
    private String LivePlayUrl;

    @TableField(exist = false)
    @ApiModelProperty(value = "离开播时间还有多久的时间戳")
    private Long startTimeSecond;

    @TableField(exist = false)
    @ApiModelProperty(value = "0-待支付 1-已支付")
    private Integer payStatus;

    @TableField(exist = false)
    @ApiModelProperty(value = "报名人数")
    private Long joinNum = 0L;

    // 录播媒质
    @TableField(exist = false)
    @ApiModelProperty(value = "录播内容")
    private List<LivetelecastRecord> records;

}
